<?php

/**
 * RepresentationSpectacle form.
 *
 * @package    tfe
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class RepresentationSpectacleForm extends BaseRepresentationSpectacleForm {
    /**
     * @see EvenementForm
     */
    public function configure() {
        parent::configure();
        unset($this['type']);
        unset($this['created_at'], $this['updated_at'], $this['deleted_at']);

        $this->widgetSchema['id_spectacle'] = new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Spectacle'), 'add_empty' => false));
        $this->widgetSchema['id_spectacle']->setOption('renderer_class', 'sfWidgetFormDoctrineJQueryAutocompleter');
        $this->widgetSchema['id_spectacle']->setOption('renderer_options', array(
                'model' => 'Spectacle',
                'url'   => '/spectacle/autocomplete',
        ));
    }
}
